﻿@using Coslen.Framework.Helpers
@model Coslen.TahorCRM.Domain.Entities.ViewModels.Editing.RoleEditViewModel

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Role</legend>

		@Html.Partial("_CreateOrEdit", Model)
        
        
        <div>
            <span>Rights</span><br/>
            @Html.CheckBoxListFor(model => model.SelectedRights, new MultiSelectList(Model.PossibleSelectedRights, "Value", "Text", Model.SelectedRights), 3)
        </div>
		
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
